package com.uobgroup.ews.uam.core.service;

import java.util.List;

import com.uobgroup.ews.uam.core.domain.Reference;
import com.uobgroup.ews.uam.core.domain.UAMRole;

public interface UAMRoleService {

   public abstract long countAllUAMRoles();

   public abstract void deleteUAMRole(UAMRole uamRole);

   public abstract UAMRole findUAMRole(Long id);

   public abstract List<UAMRole> findAllUAMRoles();

   public abstract List<UAMRole> findUAMRoleEntries(int firstResult, int maxResults);

   public abstract void saveUAMRole(UAMRole uamRole);

   public abstract UAMRole updateUAMRole(UAMRole uamRole);
   
   /**
    * find the roles by role name
    * @author ndduy
    * @param name
    * @return {@link List}
    */
   public List<UAMRole> findByName(String name);
   
   public Boolean IsAssignProfile(Long RoleId);
   
   public Boolean IsExistSecurityGroup(UAMRole uamRole);
   /**
    * @author dongn
    */
   public long countRoleThatHasRoleTypeReference(Reference roleType);
   
   public long countRoleThatHasProcessingCentreReference(Reference processingCentre);
   
   public long countRoleThatHasDepartmentReference(Reference department);

}
